<template>
    <view>
      <view class="page-header">
        <view class="header-left" @click="goBack">
          <u-icon name="arrow-left" size="20" color="#333"></u-icon>
          <text>返回</text>
        </view>
        <view class="header-title"></view>
        <view class="header-right"></view>
      </view>
      <view v-html="agreement.content" style="padding: 20rpx;">
      </view>
    </view>
  </template>
  
  <script>
  import { getAgreementType } from '@/api/user'
  export default {
    data() {
      return {
        agreement: ''
      }
    },
    onLoad(options) {
      getAgreementType({type: 'privacy_agreement'}).then(res => {
        this.agreement = res.data.data
      })
    },
    methods: {
      goBack() {
        uni.navigateBack()
      }
    }
  }
  </script>
  
  
  <style scoped>
  .page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 90rpx;
    background-color: #fff;
    padding: 0 30rpx;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .header-left {
    display: flex;
    align-items: center;
  }
  
  .header-left text {
    margin-left: 10rpx;
    font-size: 28rpx;
    color: #333;
  }
  
  .header-title {
    font-size: 32rpx;
    font-weight: 500;
    color: #333;
  }
  
  .header-right {
    width: 60rpx;
  }
  </style>